//
//  HMFeedBackViewController.m
//  Setting
//
//  Created by 李贺 on 2017/1/4.
//  Copyright © 2017年 李贺. All rights reserved.
//

#import "HMFeedBackViewController.h"
#import "Masonry.h"
#import "UILabel+Addition.h"

@interface HMFeedBackViewController ()
@property (nonatomic, strong) UITextField * textField1;
@end

@implementation HMFeedBackViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.navigationItem.title = @"意见反馈";
    self.view.backgroundColor = [UIColor whiteColor];
    
    UITextView * textView = [[UITextView alloc] init];
    [self.view addSubview:textView];
    textView.layer.borderColor = UIColor.grayColor.CGColor;
    textView.layer.borderWidth = 0.5;
    textView.layer.cornerRadius = 6;
    textView.layer.masksToBounds = YES;


    UITextField * textField2 = [[UITextField alloc] init];
    textField2.placeholder = @"你的邮箱或者手机号";
    [self.view addSubview:textField2];
    textField2.borderStyle = UITextBorderStyleRoundedRect;
    
    UILabel * lable1 = [UILabel hm_labelWithText:@"请通过以下方式联系我们:" fontSize:12 color:[UIColor lightGrayColor]];
    UILabel * lable2 = [UILabel hm_labelWithText:@"微信公众号:TTTalkingShow" fontSize:12 color:[UIColor lightGrayColor]];
    UILabel * lable3 = [UILabel hm_labelWithText:@"邮箱:zhanglu@dggroup.cn" fontSize:12 color:[UIColor lightGrayColor]];
    [self.view addSubview:lable1];
    [self.view addSubview:lable2];
    [self.view addSubview:lable3];
   
    UIButton * btn = [[UIButton alloc] init];
    [btn setTitle:@"提交" forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal];
    [self.view addSubview:btn];
    
    [textView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view);
        make.left.equalTo(self.view.mas_left).offset(8);
        make.right.equalTo(self.view.mas_right).offset(-8);
        make.top.equalTo(self.view.mas_top).offset(70);
        make.height.offset(120);
    }];

    [textField2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(textView.mas_left);
        make.width.equalTo(textView.mas_width);
        make.top.equalTo(textView.mas_bottom).offset(8);
    }];

    [lable1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(textView.mas_left);
        make.top.equalTo(textField2.mas_bottom).offset(8);
    }];
    
    [lable2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(textView.mas_left);
        make.top.equalTo(lable1.mas_bottom);
    }];
    
    [lable3 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(textView.mas_left);
        make.top.equalTo(lable2.mas_bottom);
    }];
    
    [btn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view);
        make.bottom.equalTo(self.view.mas_bottom).offset(-16);
    }];
    
    
    [btn addTarget:self action:@selector(commitBtnClick:) forControlEvents:UIControlEventTouchUpInside];
}

///点击提交后调用
- (void)commitBtnClick:(UIButton *)btn{
    
}

@end
